package com.mask.common.web.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new RateLimitInterceptor())
//            .addPathPatterns("/**");
    }

//    @Bean
//    public FilterRegistrationBean<XssFilter> xssFilterRegistration() {
//        FilterRegistrationBean<XssFilter> registration = new FilterRegistrationBean<>();
//        registration.setFilter(new XssFilter());
//        registration.addUrlPatterns("/*");
//        registration.setOrder(1);
//        return registration;
//    }
//
//    @Bean
//    public Docket createRestApi() {
//        return new Docket(DocumentationType.OAS_30)
//            .apiInfo(apiInfo())
//            .select()
//            .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
//            .paths(PathSelectors.any())
//            .build();
//    }
}